First, let’s open a terminal and install the following packages:
sudo apt-get install alien libaio1
Then download del installation file. Go to the Download page at Oracle. http://www.oracle.com/technetwork/database/database-technologies/express-edition/downloads/index.html
In order to download the package, you must have a registered user at Oracle website. If you don’t, please do register and try again. At the time of this post, the following file was downloaded. http://download.oracle.com/otn/linux/oracle11g/xe/oracle-xe-11.2.0-1.0.x86_64.rpm.zip If you click on this link you’ll be prompted for a user and password.
Notice that the instalation file is an .rpm file. This is the package format for RedHat or Fedora. But Debian uses de .deb Debian format. The assumption is that the downloaded files is at ~/Downloads/. So we change to that directory and uncompress the file:
cd ~/Downloads unzip oracle-xe-11.2.0-1.0.x86_64.rpm.zip
A new directory appears, so we change there.
cd Disk1
Now we convert the rpm package to a Debian package:
sudo alien --scripts oracle-xe-11.2.0-1.0.x86_64.rpm oracle-xe_11.2.0-2_amd64.deb generated
We have to create a file for the daemon system to work fine with this tool. So we create a new chkconfig file.
cd /sbin sudo nano chkconfig
The file is empty. So we fill the file with the following content:
#!/bin/bash # Oracle 11gR2 XE installer chkconfig hack for Ubuntu/Debian file=/etc/init.d/oracle-xe if [[ ! 'tail -n1 $file | grep INIT' ]]; then echo >> $file echo '### BEGIN INIT INFO' >> $file echo '# Provides: OracleXE' >> $file echo '# Required-Start: $remote_fs $syslog' >> $file echo '# Required-Stop: $remote_fs $syslog' >> $file echo '# Default-Start: 2 3 4 5' >> $file echo '# Default-Stop: 0 1 6' >> $file echo '# Short-Description: Oracle 11g Express Edition' >> $file echo '### END INIT INFO' >> $file fi update-rc.d oracle-xe defaults 80 01 # EOF
We change permissions and check the result:
sudo chmod 755 chkconfig ls -l chkconfig -rwxr-xr-x 1 root root 555 Aug 28 20:53 chkconfig
In your case, the number after root root can be different, also time and date.
We have to create links for some applications that are at different places on Fedora an RedHat that are cabled inside Oracle’s instalation:
sudo ln -s /usr/bin/awk /bin/awk ls -l /bin/awk lrwxrwxrwx 1 root root 12 Aug 28 20:58 /bin/awk -> /usr/bin/awk
Let’s check whether Debian got a ram-disk. We should have it installed.
df -k Filesystem 1K-blocks Used Available Use% Mounted on ... tmpfs 3985052 5828 3979224 1% /dev/shm ...
(Optional) If there is no /dev/shm then we have to create it. Debian 8 normally has it.
sudo rm -rf /dev/shm sudo mkdir /dev/shm sudo mount -t tmpfs shmfs -o size=2048m /dev/shm
Edit the following file and add the following text.
sudo gedit /etc/rc2.d/S01shm_load #!/bin/sh case "$1" in start) mkdir /var/lock/subsys 2>/dev/null touch /var/lock/subsys/listener rm /dev/shm 2>/dev/null mkdir /dev/shm 2>/dev/null mount -t tmpfs shmfs -o size=2048m /dev/shm ;; *) echo error exit 1 ;; esac sudo chmod 755 /etc/rc2.d/S01shm_load
If /dev/shm is already created, just continue with the installation. We return to the original directory.
cd ~/Downloads/Disk1
Now we are ready to install the product
sudo dpkg --install ./oracle-xe_11.2.0-2_amd64.deb Selecting previously unselected package oracle-xe. (Reading database ... 737155 files and directories currently installed.) Preparing to unpack ./oracle-xe_11.2.0-2_amd64.deb ... Unpacking oracle-xe (11.2.0-2) ... Setting up oracle-xe (11.2.0-2) ... Executing post-install steps... insserv: warning: script 'K01oracle-xe' missing LSB tags and overrides insserv: warning: script 'oracle-xe' missing LSB tags and overrides You must run '/etc/init.d/oracle-xe configure' as the root user to configure the database. Processing triggers for gnome-menus (3.13.3-6) ... Processing triggers for desktop-file-utils (0.22-1) ... Processing triggers for mime-support (3.58) ... Processing triggers for systemd (215-17+deb8u4) ... Processing triggers for libc-bin (2.19-18+deb8u4) ...
Now it is installed. But we have to fix some problems
We have to correct the users profile. We edit the following file, and fill the following text in order to start using this product.
sudo nano /etc/bash.bashrc export ORACLE_HOME=/u01/app/oracle/product/11.2.0/xe export ORACLE_SID=XE export NLS_LANG=`$ORACLE_HOME/bin/nls_lang.sh` export ORACLE_BASE=/u01/app/oracle export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH export PATH=$ORACLE_HOME/bin:$PATH source /etc/bash.bashrc
We have to configure the oracle-xe application.
cd .. sudo /etc/init.d/oracle-xe configure Oracle Database 11g Express Edition Configuration ------------------------------------------------- This will configure on-boot properties of Oracle Database 11g Express Edition. The following questions will determine whether the database should be starting upon system boot, the ports it will use, and the passwords that will be used for database accounts. Press to accept the defaults. Ctrl-C will abort. Specify the HTTP port that will be used for Oracle Application Express [8080]: Specify a port that will be used for the database listener [1521]: Specify a password to be used for database accounts. Note that the same password will be used for SYS and SYSTEM. Oracle recommends the use of different passwords for each database account. This can be done after initial configuration: Confirm the password: Do you want Oracle Database 11g Express Edition to be started on boot (y/n) [y]: Starting Oracle Net Listener...Done Configuring database...Done Starting Oracle Database 11g Express Edition instance...Done Installation completed successfully.
Now we start service.
sudo service oracle-xe start
We got a new link at our desktop. By clicking a web browser appears. It will request us user and password. This could be user system and the password configured.
And we are working already. Oracle 11g XE Database is working normally.
In order to install SQLDeveloper we need to install Oracle Java for Debian.
We install Oracle-Java-8 following the next link:
http://informatica-fcien.blogspot.com.uy/2016/07/instalar-oracle-java-en-debian.html
After installation we check whether version of Oracle Java is installed.
Selection Path Priority Status ------------------------------------------------------------ * 0 /usr/lib/jvm/java-8-oracle/jre/bin/java 1081 auto mode 1 /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java 1071 manual mode 2 /usr/lib/jvm/java-8-oracle/jre/bin/java 1081 manual mode Press enter to keep the current choice[*], or type selection number: 1 update-alternatives: using /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java to provide /usr/bin/java (java) in manual mode
We install SQLdeveloper from http://www.oracle.com/technetwork/developer-tools/sql-developer/downloads/index.html
We download the file sqldeveloper_4.1.5.21.78-2_all.noarch.rpm
And convert the package.
sudo alien --scripts -d sqldeveloper_4.1.5.21.78-2_all.noarch.rpm sqldeveloper_4.1.3.20.78-2_all.deb generated
Now we are ready to install:
sudo dpkg -i sqldeveloper_4.1.5.21.78-2_all.deb
Although we have a link to the application, we should call it from a terminal for the first time.
sqldeveloper
And will ask where are the Oracle java JDK. We just write:
/usr/lib/jvm/java-8-oracle
and SQLDeveloper will start its visual interface.
Now we can add a profile, and make sure it connects to the database manager.
The new profile asks for user and password to connect from localhost. We used system with its password.
Then we are ready to work.
You can install Oracle Data Modeler just with the same steps than for SQLDeveloper.
This helped me a bunch! Thanks a lot mate. Also, the instructions differs a bit on XE-18C.